<!--index.html-->
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8">
</head>
<body>
<h1>WebView onAlert Demo</h1>
<div>
    <input type="text" id="text" value="111" style="width:150px">
</div>
<button onclick="callAlert()">callAlert()</button>
<button onclick="callConfirm()">callConfirm()</button>
<button onclick="callPrompt()">callPrompt()</button>

<p id="demo"></p>
<script>
    function callAlert() {
      alert("Hello World");
    }

    function callConfirm() {
      let r = confirm("click button");
      myLog("callConfirm, r=" + r);
    }

    function callPrompt() {
        let message = prompt("Message Info", "Hello World");
        myLog("callPrompt, message=" + message);
    }

    function myLog(msg) {
      document.getElementById("demo").innerHTML = msg;
    }

</script>
</body>
</html>
